<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="Author" content="">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="telephone=no" name="format-detection" /> 
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>记录回播</title>
    <link rel="stylesheet" type="text/css" href="/src/css/video-js.min.css">
    <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?8ed2efe5b24e14f351f4d88ba2eb3462";
      var s = document.getElementsByTagName("script")[0]; 
      s.parentNode.insertBefore(hm, s);
    })();
    </script>
    <style type="text/css">
    	*{margin:0;padding:0;}
    	html,body,#videohtml{width:100%;height:100%;}
    	.video-js{width:100%;height:100%;}
    </style>
</head>
<body>
	<div class="video" id="videohtml"></div>

<script type="text/javascript" src="/src/js/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="/src/js/init.js?__version=9.4"></script>
<script type="text/javascript" src="/src/js/video.min.js"></script>
<script type="text/javascript">
	$(function(){
		var machine_id = getQueryString("machine_id");
		var gameid = getQueryString("gameid");
		fetchData("/OpenAPI/v1/ToyMachine/getMachineInfo",{machine_id: machine_id},function(data){
				console.log(data);
				var game=data.games;
				var html='';
				for(var i=0;i<game.length;i++){
					if(gameid==game[i]['game_id']){
						html='<video id="videoHLS" class="video-js vjs-big-play-centered videoHLS-dimensions" controls  data-setup=\'{"preload": "auto"}\' webkit-playsinline  playsinline  x-webkit-airplay="true" x5-video-player-type="h5"  x5-video-player-fullscreen="true" poster=""><source src="'+game[i]['video_url']+'" type="video/mp4"></video>';
					}
				}
				$("#videohtml").html(html);
			})
	})
</script>
</body>
</html>